var map = new window.BMapGL.Map("container");
map.centerAndZoom(new BMapGL.Point(104.06, 30.67), 10);
map.enableScrollWheelZoom(true);

axios.get("/address/findAll.do").then((res) => {
    if (res.data.flag) {
        var list = res.data.data;
        for (address of list) {
// 创建点标记
            var marker = new BMapGL.Marker(new BMapGL.Point(address.lng, address.lat));
// 在地图上添加点标记
            map.addOverlay(marker);

            var opts = {
                position: new BMapGL.Point(address.lng, address.lat), // 指定文本标注所在的地理位置
                offset: new BMapGL.Size(10, -40) // 设置文本偏移量
            };

// 创建文本标注对象
            var label = new BMapGL.Label(address.address, opts);
            map.addOverlay(label);
// 自定义文本标注样式
            label.setStyle({
                color: 'black',
                borderRadius: '5px',
                borderColor: 'red',
                padding: '10px',
                fontSize: '16px',
                height: '30px',
                lineHeight: '30px',
                fontFamily: '微软雅黑'
            });
        }
    }
})
